package com.kk.permission.huawei.bnd_al00;

import android.accessibilityservice.AccessibilityService;
import android.content.Context;
import android.util.Log;
import android.view.accessibility.AccessibilityEvent;
import android.view.accessibility.AccessibilityNodeInfo;

import com.kk.permission.AccessibilityEventType;
import com.kk.permission.huawei.HuaweiPermissionAccessbilityHandlerBase;

public class HuaweiBNDAL00PermissionAccessbilityHandler extends HuaweiPermissionAccessbilityHandlerBase {
    private static final String TAG = "HuaweiHandler";

    HuaweiBNDAL00PermissionAccessbilityHandler(Context context) {
        super(context);
    }

    public void handleAccessbilityEvent(AccessibilityEvent accessibilityEvent, AccessibilityService accessibilityService, AccessibilityEventType accessibilityEventType) {
        AccessibilityNodeInfo rootInActiveWindow = accessibilityService.getRootInActiveWindow();
        StringBuilder stringBuilder = new StringBuilder();
        stringBuilder.append("");
        stringBuilder.append(accessibilityEventType.getName());
        Log.e("zhaoyanjun:han", stringBuilder.toString());
        switch (accessibilityEventType) {
            case DEFAULT:
                this.mAccessibilityUtil.closeAccessibilityActivity(rootInActiveWindow, accessibilityService);
                return;
            case TOAST:
                this.mFloatWindowUtil.floatWindow(rootInActiveWindow, accessibilityService);
                return;
            case AUTOBOOT:
                this.mAutoStartUtil.autoStart2(rootInActiveWindow, accessibilityService);
                return;
            case BACKGROUNDPROTECT:
                this.mBackgroundProtectUtil.backgroundProtect(rootInActiveWindow, accessibilityService);
                return;
            case DIALNOTI:
                this.mCallNotificationUtil.callNotification(rootInActiveWindow, accessibilityService);
                return;
            case SHORTCUT:
                this.mShortCutUtil.shortcut2(rootInActiveWindow, accessibilityService);
                return;
            case CALLRINGTONE:
                this.mModifySystemUtil.modify(rootInActiveWindow, accessibilityService);
                return;
            case TRUST_APP:
                this.mTrustAppUtil.trustApp2(rootInActiveWindow, accessibilityService);
                return;
            case SYSTEMDIALING:
                this.mSystemDialingUtil.systemDialing(rootInActiveWindow, accessibilityService);
                return;
            default:
                return;
        }
    }
}
